package com.yupi.yupipicturebackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yupi.yupipicturebackend.model.dto.user.UserQueryRequest;
import com.yupi.yupipicturebackend.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yupipicturebackend.model.vo.LoginUserVO;
import com.yupi.yupipicturebackend.model.vo.UserVO;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author hwz04
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-03-07 15:16:41
*/

public interface UserService extends IService<User> {

//    用户注册
    long userRegister(String userAccount,String userPassword,String checkPassword);

//    用户登录
    LoginUserVO userLogin(String userAccount, String userPassword, HttpServletRequest request);


//    获取加密后的密码
    String getEncryptPassword(String userPassword);

//    获取当前登入用户类
    User getLoginUser(HttpServletRequest request);

//    获得脱敏后的用户登入信息
    LoginUserVO getLoginUserVO(User user);

//    用户注销
    boolean userLogout(HttpServletRequest request);

    UserVO getUserVO(User user);

    List<UserVO> getUserVOList(List<User> userList);

    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    //是否为管理员
    boolean isAdmin(User user);

}
